﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Nop.Web.Framework.Mvc;
using Nop.Web.Framework;

namespace Nop.Plugin.Pricing.PreciousMetals.Models
{
    public class PreciousMetalsGridDetailModel : BaseNopEntityModel
    {
        public int ProductVariantId { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.Enabled")]
        public bool Enabled { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.MetalType")]
        [UIHint("Nop.Plugin.Pricing.PreciousMetals.Views.PreciousMetalsPricing.EditorTemplates.MetalTypeDropdown")]
        public PreciousMetalType MetalType { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.QuoteType")]
        [UIHint("Nop.Plugin.Pricing.PreciousMetals.Views.PreciousMetalsPricing.EditorTemplates.QuoteTypeDropdown")]
        public PreciousMetalsQuoteType QuoteType { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.Weight")]
        public decimal Weight { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.PercentMarkup")]
        [DisplayFormat(DataFormatString = "{0:F2}", ApplyFormatInEditMode = true)]
        public decimal PercentMarkup { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.FlatMarkup")]
        [DisplayFormat(DataFormatString = "{0:F2}", ApplyFormatInEditMode = true)]
        public decimal FlatMarkup { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.TierPriceType")]
        [UIHint("Nop.Plugin.Pricing.PreciousMetals.Views.PreciousMetalsPricing.EditorTemplates.TierPriceTypeDropdown")]
        public PreciousMetalsTierPriceType TierPriceType { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.ProductVariantTitle")]
        [ReadOnly(true)]
        public string ProductVariantTitle { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.MathType")]
        [UIHint("Nop.Plugin.Pricing.PreciousMetals.Views.PreciousMetalsPricing.EditorTemplates.MathTypeDropdown")]
        public PreciousPriceCalculationType MathType { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.LowerAmount")]
        public decimal LowerAmount { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.WeightUnit")]
        [UIHint("Nop.Plugin.Pricing.PreciousMetals.Views.PreciousMetalsPricing.EditorTemplates.WeightUnitDropdown")]
        public int WeightId { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.CurrentPrice")]
        [ReadOnly(true)]
        public decimal CurrentPrice { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.PriceRoundingType")]
        [UIHint("Nop.Plugin.Pricing.PreciousMetals.Views.PreciousMetalsPricing.EditorTemplates.PriceRoundingTypeDropdown")]
        public PriceRoundingType PriceRoundingType { get; set; }

        [NopResourceDisplayName("Admin.Catalog.PreciousMetal.PriceRounding")]
        public int PriceRounding { get; set; }
    }
}